package com.jgz.websocketdemo;

import com.jgz.websocketdemo.type.ArenaGameTypeEnum;
import com.jgz.websocketdemo.type.ArenaMsgTypeEnum;
import com.jgz.websocketdemo.type.ArenaTypeEnum;
import com.jgz.websocketdemo.type.ConnMsgType;

/**
 * 还差一个房间信息
 *
 * @author 揭光智
 * @date 2018/12/13
 */

public class WebSocketMsgResult<T> {

    /**
     * 竞技消息类型：订阅,反订阅,开始竞技
     */
    private ArenaMsgTypeEnum arenaMsgType;

    /**
     * 状态码
     */
    private int code;

    /**
     * 状态码代表的含义
     */
    private String msg;

    /**
     * 主题：订阅/反订阅的主题，或者竞技场的房间号
     */
    private String topic;

    /**
     * 游戏类型
     */
    private ArenaGameTypeEnum gameType;

    /**
     * 竞技类型
     */
    private ArenaTypeEnum arenaType;

    private T data;

    /**
     * 消息类型
     */
    private ConnMsgType msgType;


    public ArenaMsgTypeEnum getArenaMsgType() {
        return arenaMsgType;
    }

    public void setArenaMsgType(ArenaMsgTypeEnum arenaMsgType) {
        this.arenaMsgType = arenaMsgType;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public ArenaGameTypeEnum getGameType() {
        return gameType;
    }

    public void setGameType(ArenaGameTypeEnum gameType) {
        this.gameType = gameType;
    }

    public ArenaTypeEnum getArenaType() {
        return arenaType;
    }

    public void setArenaType(ArenaTypeEnum arenaType) {
        this.arenaType = arenaType;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public ConnMsgType getMsgType() {
        return msgType;
    }

    public void setMsgType(ConnMsgType msgType) {
        this.msgType = msgType;
    }

    @Override
    public String toString() {
        return "WebSocketMsgResult{" +
                "arenaMsgType=" + arenaMsgType +
                ", code=" + code +
                ", msg='" + msg + '\'' +
                ", topic='" + topic + '\'' +
                ", gameType=" + gameType +
                ", arenaType=" + arenaType +
                ", data=" + data +
                ", msgType=" + msgType +
                '}';
    }
}
